package com.vizhuo.client.business.meb.mebacc.vo;

import java.io.Serializable;
import java.math.BigDecimal;

import com.vizhuo.client.base.AbstractVo;
import com.vizhuo.client.util.ClientUtil;

/**
 * 发货人实体类
 * 
 * @author luzh
 * @date 创建时间：2015年6月29日 下午4:10:58
 * @version 1.0
 * @parameter
 * @since
 * @return
 */
public class MebConsignerVo extends AbstractVo implements Serializable {
    /**
     * 
     */
    private static final long serialVersionUID = -2709486367258398816L;

    private Integer id;

    /**
     * 姓名
     */
    private String name;

    /**
     * 常用电话
     */
    private String phone;

    /**
     * 认证状态
     */
    private String checkFlag;

    /**
     * 认证失败项目集合(字符串)
     */
    private String checkFlagItemsStr;

    /**
     * 认证状态(说明）
     */
    private String checkFlagRemark;

    /**
     * 来源
     */
    private String sourceCode;

    /**
     * 推荐人
     */
    private String referrer;

    /**
     * 店铺名称
     */
    private String shopName;

    /**
     * 身份证号
     */
    private String idCard;

    /**
     * 营业执照路径
     */
    private String licensePicPath;

    /**
     * 营业执照图片名称
     */
    private String licensePicName;

    /**
     * 门头照片路径
     */
    private String shopPicPath;

    /**
     * 门头照片名称
     */
    private String shopPicName;

    /**
     * 商户类型,不能为空 (1：华凌商户，0：普通商户)
     */
    private String merchantFlag;

    /**
     * 商户编号
     */
    private String serialNumber;

    /**
     * 登录账号实体类信息，只是为了方便用于客户端展示信息使用
     */
    private MebAccVo mebAcc;

    /**
     * 好评率
     */
    private BigDecimal highPraiseRate;

    /**
     * 成单数量
     */
    private Integer orderEndCount;

    /**
     * 投诉量
     */
    private Integer complaintNums;

    /**
     * 头像图片路径
     */
    private String headPicPath;

    /**
     * 头像图片名称
     */
    private String headPicName;

    // 常发货物
    private String goodsSendOften;

    private Integer MebAccId;

    public Integer getMebAccId() {
        return MebAccId;
    }

    public void setMebAccId(Integer mebAccId) {
        MebAccId = mebAccId;
    }

    public Integer getComplaintNums() {
        return complaintNums == null ? 0 : complaintNums;
    }

    public void setComplaintNums(Integer complaintNums) {
        this.complaintNums = complaintNums;
    }

    public String getName() {
        return ClientUtil.str(name);
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getCheckFlag() {
        return checkFlag;
    }

    public void setCheckFlag(String checkFlag) {
        this.checkFlag = checkFlag;
    }

    public String getSourceCode() {
        return sourceCode;
    }

    public void setSourceCode(String sourceCode) {
        this.sourceCode = sourceCode;
    }

    public String getReferrer() {
        return referrer;
    }

    public void setReferrer(String referrer) {
        this.referrer = referrer;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getLicensePicPath() {
        return licensePicPath;
    }

    public void setLicensePicPath(String licensePicPath) {
        this.licensePicPath = licensePicPath;
    }

    public String getLicensePicName() {
        return licensePicName;
    }

    public void setLicensePicName(String licensePicName) {
        this.licensePicName = licensePicName;
    }

    public String getShopPicPath() {
        return shopPicPath;
    }

    public void setShopPicPath(String shopPicPath) {
        this.shopPicPath = shopPicPath;
    }

    public String getShopPicName() {
        return shopPicName;
    }

    public void setShopPicName(String shopPicName) {
        this.shopPicName = shopPicName;
    }

    public String getMerchantFlag() {
        return merchantFlag;
    }

    public void setMerchantFlag(String merchantFlag) {
        this.merchantFlag = merchantFlag;
    }

    public MebAccVo getMebAcc() {
        return mebAcc;
    }

    public void setMebAcc(MebAccVo mebAcc) {
        this.mebAcc = mebAcc;
    }

    public String getSerialNumber() {
        return serialNumber;
    }

    public void setSerialNumber(String serialNumber) {
        this.serialNumber = serialNumber;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public BigDecimal getHighPraiseRate() {
        return highPraiseRate;
    }

    public String findHighPraiseRateStr() {
        if (highPraiseRate != null) {
            return highPraiseRate.multiply(new BigDecimal(100)).intValue() + "%";
        } else {
            return "0%";
        }
    }

    public void setHighPraiseRate(BigDecimal highPraiseRate) {
        this.highPraiseRate = highPraiseRate;
    }

    public String getHeadPicPath() {
        return headPicPath;
    }

    public void setHeadPicPath(String headPicPath) {
        this.headPicPath = headPicPath;
    }

    public String getHeadPicName() {
        return headPicName;
    }

    public void setHeadPicName(String headPicName) {
        this.headPicName = headPicName;
    }

    public Integer getOrderEndCount() {
        return orderEndCount == null ? 0 : orderEndCount;
    }

    public void setOrderEndCount(Integer orderEndCount) {
        this.orderEndCount = orderEndCount;
    }

    @Override
    public String toString() {
        return "MebConsignerVo [id=" + id + ", name=" + name + ", phone=" + phone + ", checkFlag=" + checkFlag
                + ", sourceCode=" + sourceCode + ", referrer=" + referrer + ", shopName=" + shopName + ", idCard="
                + idCard + ", licensePicPath=" + licensePicPath + ", licensePicName=" + licensePicName
                + ", shopPicPath=" + shopPicPath + ", shopPicName=" + shopPicName + ", merchantFlag=" + merchantFlag
                + ", serialNumber=" + serialNumber + ", mebAcc=" + mebAcc + ", highPraiseRate=" + highPraiseRate
                + ", orderEndCount=" + orderEndCount + ", headPicPath=" + headPicPath + ", headPicName=" + headPicName
                + "]";
    }

    public String getCheckFlagRemark() {
        return checkFlagRemark;
    }

    public void setCheckFlagRemark(String checkFlagRemark) {
        this.checkFlagRemark = checkFlagRemark;
    }

    public String getCheckFlagItemsStr() {
        if (checkFlagItemsStr != null && checkFlagItemsStr.startsWith(",")) {
            checkFlagItemsStr = checkFlagItemsStr.substring(1);
        }

        if (checkFlagItemsStr != null && checkFlagItemsStr.endsWith(",")) {
            checkFlagItemsStr = checkFlagItemsStr.substring(0, checkFlagItemsStr.length() - 1);
        }
        return checkFlagItemsStr;
    }

    public void setCheckFlagItemsStr(String checkFlagItemsStr) {
        this.checkFlagItemsStr = checkFlagItemsStr;
    }

    public String getGoodsSendOften() {
        return goodsSendOften;
    }

    public void setGoodsSendOften(String goodsSendOften) {
        this.goodsSendOften = goodsSendOften;
    }

}
